package com.cater.common;

import java.io.Serializable;

import com.cater.utils.StringUitl;

public class BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	private Integer createUserId;// 创建者

	private Integer updateUserId;// 修改者

	private String updateDate;// 修改时间

	private String createDate;// 创建时间

	private Integer roleId;

	private Integer delflag;

	public Integer getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(Integer createUserId) {
		this.createUserId = createUserId;
	}

	public Integer getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(Integer updateUserId) {
		this.updateUserId = updateUserId;
	}

	public String getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public Integer getDelflag() {
		return delflag;
	}

	public void setDelflag(Integer delflag) {
		this.delflag = delflag;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public static void getCreate(BaseEntity base) {
		base.setCreateUserId(UserContext.getId());
		base.setCreateDate(StringUitl.getDate());
		base.setDelflag(0);
	}

	public static void getupdate(BaseEntity base) {
		base.setUpdateUserId(UserContext.getId());
		base.setUpdateDate(StringUitl.getDate());
	}

}
